-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
testsuite: use TAP for unit tests #87
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
garlick
force-pushed
the
tap_unit_tests
branch
from
January 25, 2024 17:27
9debe8f
to
107cff9
Compare
Fixed a distcheck problem and rebased on current master. |
chu11
approved these changes
Jan 25, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@Mergifyio rebase |
✅ Branch has been successfully rebased |
@Mergifyio rebase |
Problem: the test/tpm script has no users. Drop script.
Problem: vpcd is a test program but it is installed. Don't install it or its device script.
Problem: the test suite sets TEST_ETC in the test environment but nothing uses it. Drop TEST_ETC from the test environment.
Problem: the argv unit test lives in the test subdirectory with a custom driver. Move it to the libcommon directory, near the source it is testing. Have 'make check' run it directly.
Problem: pluglist class is only used by powerman yet it resides in libcommon. Move pluglist to the powerman directory. Move the pluglist unit test to the powerman directory, but leave its driver in the top test directory for now.
Problem: the xregex unit test lives in the test subdirectory with a custom driver. Move it to the libcommon directory, near the source it is testing. Have 'make check' run it directly.
Problem: the API client test program lives in the top level test directory, but it would be usefully co-located with the source code that it tests. Move test/cli.c to src/powerman/test/apiclient.c. Update test driver in the top level test directory.
Problem: unit testing is required for some small classes used in powerman. Pull in libtap (via the flux-pmix project), originally from https://github.com/zorgnax/libtap
Problem: TAP output is not interpreted by 'make check'. Prepare to add TAP tests by adding the automake TAP driver.
Problem: argv unit test just asserts on failure. Convert it to a libtap unit test and run it with the TAP driver. Rename executable with .t suffix to indicate that it's a TAP test.
Problem: xregex unit test just asserts on failure. Convert it to a libtap unit test and run it with the TAP driver. Rename executable with .t suffix to indicate that it's a TAP test.
✅ Branch has been successfully rebased |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem: there is no real framework for unit tests in powerman
Relocate unit tests from the top level
test
directory to atest
subdirectory co-located with the relevant source.Pull in the automake TAP driver and libtap.
Convert two unit tests that were just calling
assert()
on failure to use TAP format.This is on top of #86